<html>
<head><meta charset="utf-8"><title>pub and macro-rules · t-lang · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/index.html">t-lang</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/pub.20and.20macro-rules.html">pub and macro-rules</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="217062358"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/pub%20and%20macro-rules/near/217062358" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/pub.20and.20macro-rules.html#217062358">(Nov 17 2020 at 21:03)</a>:</h4>
<p>So <span class="user-mention" data-user-id="239881">@Josh Triplett</span> and I were talking about pub macro rules and I wanted to clarify something. I don't think we need an accepted RFC to land the PR, but I would like to see it land in the context of an active project group. If we run the with <a href="https://hackmd.io/YQAYm_hiS_KWCsid5sRVjw?edit">staging process</a> that I proposed recently in <a class="stream-topic" data-stream-id="196563" href="/#narrow/stream/196563-t-lang.2Fmeta/topic/staged.20proposals">#t-lang/meta &gt; staged proposals</a>, then this means that it would be "stage 1", which is an "accepted charter".</p>



<a name="217062383"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/pub%20and%20macro-rules/near/217062383" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/pub.20and.20macro-rules.html#217062383">(Nov 17 2020 at 21:03)</a>:</h4>
<p>(cc <span class="user-mention" data-user-id="116122">@simulacrum</span>, <span class="user-mention" data-user-id="123856">@Vadim Petrochenkov</span>)</p>



<a name="217062400"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/pub%20and%20macro-rules/near/217062400" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/pub.20and.20macro-rules.html#217062400">(Nov 17 2020 at 21:03)</a>:</h4>
<p>I don't really care about the bureaucratic definitions though</p>



<a name="217062460"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/pub%20and%20macro-rules/near/217062460" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/pub.20and.20macro-rules.html#217062460">(Nov 17 2020 at 21:04)</a>:</h4>
<p>all I'm really saying is that I'd like to have some folks join in with a plan to carry this feature through</p>



<a name="217062474"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/pub%20and%20macro-rules/near/217062474" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/pub.20and.20macro-rules.html#217062474">(Nov 17 2020 at 21:04)</a>:</h4>
<p>(I don't think it should all fall on <span class="user-mention" data-user-id="123856">@Vadim Petrochenkov</span>)</p>



<a name="217062490"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/pub%20and%20macro-rules/near/217062490" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/pub.20and.20macro-rules.html#217062490">(Nov 17 2020 at 21:04)</a>:</h4>
<p>in my view an accepted charter wouldn't require a lot</p>



<a name="217062509"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/pub%20and%20macro-rules/near/217062509" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/pub.20and.20macro-rules.html#217062509">(Nov 17 2020 at 21:04)</a>:</h4>
<p>but one thing it kind of <em>should</em> require is a few names of a lead, liaison, and a general scope :)</p>



<a name="217062849"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/pub%20and%20macro-rules/near/217062849" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/pub.20and.20macro-rules.html#217062849">(Nov 17 2020 at 21:07)</a>:</h4>
<p>Ok -- I think that makes some sense. I would be willing to be part of this charter as liaison, and will try to work on a draft charter soon -- probably not tonight, but we'll see :)</p>



<a name="217063004"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/pub%20and%20macro-rules/near/217063004" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/pub.20and.20macro-rules.html#217063004">(Nov 17 2020 at 21:09)</a>:</h4>
<p>Here's a very rough draft of a description that could go in a charter:</p>
<p>We'd like to transition to path-based scoping for <code>macro_rules!</code> macros, and eventually deprecate textual scoping and <code>#[macro_export]</code>. (See <a href="https://doc.rust-lang.org/stable/reference/macros-by-example.html#scoping-exporting-and-importing">https://doc.rust-lang.org/stable/reference/macros-by-example.html#scoping-exporting-and-importing</a> for details on macro scoping.) As part of that transition, we'd like to introduce visibility modifiers on macros (<code>pub macro_rules!</code>, <code>pub(crate) macro_rules!</code>, <code>pub(self) macro_rules!</code>, etc), and have any macro with a visibility modifier use path-based scoping by default. We can later use an edition boundary to change the behavior of <code>macro_rules!</code> macros without a visibility modifier, to make them private with path-based scoping as if written <code>pub(self) macro_rules!</code>.</p>



<a name="217124194"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/pub%20and%20macro-rules/near/217124194" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Daniel Henry-Mantilla <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/pub.20and.20macro-rules.html#217124194">(Nov 18 2020 at 11:46)</a>:</h4>
<p>If it is deemed useful, I can try to help within this WG <span aria-label="smile" class="emoji emoji-1f642" role="img" title="smile">:smile:</span></p>



<a name="217140332"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/pub%20and%20macro-rules/near/217140332" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/pub.20and.20macro-rules.html#217140332">(Nov 18 2020 at 14:25)</a>:</h4>
<p><span class="user-mention" data-user-id="232018">@Daniel Henry-Mantilla</span> great!</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>